package teste;

import com.thoughtworks.selenium.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class TesteSelenium extends SeleneseTestBase{

	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://localhost:8080/");
		selenium.start();
	}

	@Test
	public void testeCadastro() {
		int i = 0;
		while(i < 1 ){
		selenium.open("/ufpb-es-kivio-proj/alunos/lista");
		selenium.click("link=Cadastrar Aluno");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=nome", "Aluno");
		selenium.type("id=sobrenome", "Sobrenome");
		selenium.type("id=periodo", "1");
		selenium.click("css=button[type=\"submit\"]");
		selenium.waitForPageToLoad("30000");
		i++;
		}
	}

	@After
	public void tearDown() throws Exception {
	}
		
}
